﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace AppFramework.Migrations
{
    public partial class CreateProductModel : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "tb_WorkOrderModels",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ExplainNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    WorkOrderNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    WorkOrderName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    WorkOrderSchedule = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    RelevanceExplain = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ProductName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ProductNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    Specification = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    ProductType = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
                    Unit = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    DemandDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ExplainNum = table.Column<int>(type: "int", nullable: false),
                    AccomplishNum = table.Column<int>(type: "int", nullable: false),
                    ExplainStartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ExplainEndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    PracticalStartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    PracticalEndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Remark = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    State = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false),
                    CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreatorUserId = table.Column<long>(type: "bigint", nullable: true),
                    LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    LastModifierUserId = table.Column<long>(type: "bigint", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_tb_WorkOrderModels", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "tb_WorkOrderModels");
        }
    }
}
